package com.tengju.data.domain.model.report.performance;

import com.tengju.data.domain.model.analysis.Row;
import com.tengju.data.domain.shared.Month;
import com.tengju.data.domain.shared.Quarter;
import com.tengju.data.domain.shared.Week;
import com.tengju.user.domain.model.user.UserIdCode;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @author chenhang
 * @Date 2021/8/23
 */
public interface ReportPerformanceRepository {

    List<Row> getKaPerformanceDay(List<UserIdCode> genSecIdCodes, String date);

    List<Row> getKaPerformanceWeek(List<UserIdCode> genSecIdCodes, Week week);

    List<Row> getKaPerformanceMonth(List<UserIdCode> genSecIdCodes, Month month);

    List<Row> getKaPerformanceQuarter(List<UserIdCode> genSecIdCodes, Quarter quarter);

    LocalDateTime getUpdateTimeDay(List<UserIdCode> genSecIdCodes, String date);

    LocalDateTime getUpdateTimeWeek(List<UserIdCode> genSecIdCodes, Week week);

    LocalDateTime getUpdateTimeMonth(List<UserIdCode> genSecIdCodes, Month month);

    LocalDateTime getUpdateTimeQuarter(List<UserIdCode> genSecIdCodes, Quarter quarter);

    List<Row> getSecAllTargetTableDay(List<UserIdCode> genSecIdCodes,
                                      String date,
                                      PerFormanceOrderType orderType,
                                      Integer offset,
                                      Integer limit);

    List<Row> getSecAllTargetTableWeek(List<UserIdCode> genSecIdCodes,
                                       Week week,
                                       PerFormanceOrderType orderType,
                                       Integer offset,
                                       Integer limit);

    List<Row> getSecAllTargetTableMonth(List<UserIdCode> genSecIdCodes,
                                        Month month,
                                        PerFormanceOrderType orderType,
                                        Integer offset,
                                        Integer limit);

    List<Row> getSecAllTargetTableQuarter(List<UserIdCode> genSecIdCodes,
                                          Quarter quarter,
                                          PerFormanceOrderType orderType,
                                          Integer offset,
                                          Integer limit);

    Integer getSecAllTargetTableDayTotal(List<UserIdCode> genSecIdCodes, String date);

    Integer getSecAllTargetTableWeekTotal(List<UserIdCode> genSecIdCodes, Week week);

    Integer getSecAllTargetTableMonthTotal(List<UserIdCode> genSecIdCodes, Month month);

    Integer getSecAllTargetTableQuarterTotal(List<UserIdCode> genSecIdCodes, Quarter quarter);

    List<Row> getSecStarAllTargetTableDay(List<UserIdCode> genSecIdCodes,
                                          String date,
                                          PerFormanceOrderType orderType,
                                          UserIdCode idCode,
                                          UserIdCode superIdCode,
                                          Integer offset,
                                          Integer limit);

    List<Row> getSecStarAllTargetTableWeek(List<UserIdCode> genSecIdCodes,
                                           Week week,
                                           PerFormanceOrderType orderType,
                                           UserIdCode idCode,
                                           UserIdCode superIdCode,
                                           Integer offset,
                                           Integer limit);

    List<Row> getSecStarAllTargetTableMonth(List<UserIdCode> genSecIdCodes,
                                            Month month,
                                            PerFormanceOrderType orderType,
                                            UserIdCode idCode,
                                            UserIdCode superIdCode,
                                            Integer offset,
                                            Integer limit);

    List<Row> getSecStarAllTargetTableQuarter(List<UserIdCode> genSecIdCodes,
                                              Quarter quarter,
                                              PerFormanceOrderType orderType,
                                              UserIdCode idCode,
                                              UserIdCode superIdCode,
                                              Integer offset,
                                              Integer limit);



    Integer getSecStarAllTargetTableDayTotal(List<UserIdCode> genSecIdCodes,
                                        String date,
                                        UserIdCode idCode,
                                        UserIdCode superIdCode);

    Integer getSecStarAllTargetTableWeekTotal(List<UserIdCode> genSecIdCodes,
                                         Week week,
                                         UserIdCode idCode,
                                         UserIdCode superIdCode);

    Integer getSecStarAllTargetTableMonthTotal(List<UserIdCode> genSecIdCodes,
                                          Month month,
                                          UserIdCode idCode,
                                          UserIdCode superIdCode);

    Integer getSecStarAllTargetTableQuarterTotal(List<UserIdCode> genSecIdCodes,
                                            Quarter quarter,
                                            UserIdCode idCode,
                                            UserIdCode superIdCode);


    List<Row> getTopSecPerformanceDay(List<UserIdCode> secIdCodes, String date);

    List<Row> getTopSecPerformanceWeek(List<UserIdCode> secIdCodes, Week week);

    List<Row> getTopSecPerformanceMonth(List<UserIdCode> secIdCodes, Month month);

    List<Row> getTopSecPerformanceQuarter(List<UserIdCode> secIdCodes, Quarter quarter);

}
